<?php
class info extends control
{
    /* 构造函数。*/
    public function __construct()
    {
        parent::__construct('');
				$this->assign('mod_info5', $this->info->mod_first5());
    }
	public function index($recTotal=0, $recPerPage=2, $pageID=1){
		$this->app->loadClass('pager');
		$pager = new pager($recTotal, $recPerPage, $pageID);
		$data = $this->info->indexList($pager);
		$this->assign('data', $data);
		$this->assign('pager', $pager->get('right'));
		$this->display();
	}
    
//    public function index_o($recTotal=0, $recPerPage=10, $pageID=1){
//		print_r($this);
////    	$this->app->loadClass('pager');
////    	$pager = new pager($recTotal, $recPerPage, $pageID);    	
////     	$data = $this->info->indexList($pager);
////		
////		$this->assign('pager', $pager->get('right'));
////    	$this->assign('data', $data);
//    	
//    }

		public function show(){
			$id = intval($_REQUEST['id']);
			$data = $this->info->get($id);
			$this->assign('data', $data);
			$this->display();
		}
    

}
